package com.mrd.gtimp.business.service;

import com.mrd.base.BaseBiz;
import com.mrd.gtimp.business.entity.Declaration;
import com.mrd.gtimp.business.entity.SuiFuDan;
import com.mrd.gtimp.business.repository.SuiFuDanDao;
import com.mrd.spring.repository.BaseRepository;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

/**
 * <p>
 * application name: gtimp
 * <p>
 * copyright: Copyright@2012 明睿达科技有限公司
 */

/**
 * @author luob
 */
@Service
public class SuiFuDanBiz extends BaseBiz<SuiFuDan> {

	@Resource
	// 该处指定注入BaseRepository的dao对象
	@Qualifier("suiFuDanDao")
	public void setBaseRepository(BaseRepository<SuiFuDan, String> baseRepository) {
		super.baseRepository = baseRepository;
	}

	@Resource
	private SuiFuDanDao suiFuDanDao;

	public List<SuiFuDan> findByDeclaration(Declaration declaration) {
		return suiFuDanDao.findByDeclaration(declaration);
	}

	public List<SuiFuDan> findByTempId(String tempId) {
		return suiFuDanDao.findByTempId(tempId);
	}
}
